home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / tracker-4.13.lha / tracker / Makefile.os2 < prev    next >
Encoding:
Makefile  |  1994-07-04  |  6.3 KB  |  244 lines

  1. # Makefile for any machine
  2. # - based on my newer makefile and the GREATE
  3. # modifications by Mike Battersby
  4. ###############################################################################
  5. #
  6. # CONFIGURATION OPTIONS
  7. #
  8.  
  9. # Choose your machine type. Possible types as of this version (4.0)
  10. # are
  11. #  hpalib, hplow, hp3, dec, solaris, sparc, linux, freebsd, sgi, soundblaster,
  12. #  sbos2.
  13. MACHINE = sbos2
  14.  
  15. # The name of your C compiler. For most machines this will be
  16. # either 'cc' or 'gcc'.
  17. CC = gcc
  18.  
  19. # The suffix for object files. This will usually be .o, except for sgi and OS/2 (.j)
  20. O = .o
  21. # The suffix for executable files. This will usually be .o, except for sgi and OS/2 (.j)
  22. EXE=.exe
  23. OPTS=-c
  24. # O =.j
  25. # OPTS=-j
  26.  
  27. # User interface type. Right now, this is Unix as there are no alternatives.
  28. UI = SBOS2/./
  29.  
  30. # Destination directory for tracker binaries and manpage.
  31. #
  32. # If you don't wish to use the 'make install' and 'make install.man'
  33. # commands, you can ignore these.
  34. BIN_DIR = /usr/local/bin
  35. MAN_DIR = /usr/local/man
  36.  
  37. # How to install the binaries and manpage. If you have a unix system,
  38. # use the GNU install program if you have it, otherwise try 'cp'. For
  39. # non-unix systems, make this the command for copying a file with the
  40. # following syntax
  41. #  <program_name> <source_name> <destination_name>
  42. #
  43. # If you don't wish to use the 'make install' and 'make install.man'
  44. # commands, you can ignore this.
  45. INSTALL = install
  46.  
  47. # Permissions and user/group id's to install with. Non-unix users
  48. # should comment these out (alternatively, you can use these to
  49. # provide arguments for the above $(INSTALL) program). If you want
  50. # to install tracker setuid root (which will allow it to renice
  51. # itself when non-root users run it), change the "-m 755" below to
  52. # "-m 4755". If you do so, you must be root to run make install.
  53. #
  54. # If you don't wish to use the 'make install' and 'make install.man'
  55. # commands, you can ignore these.
  56. INST_BIN_OPT = -s -m 755 -o root -g root
  57. INST_MAN_OPT = -m 644 -o root -g root
  58. ###############################################################################
  59. #
  60. # C compiler flags and libraries for each machine.
  61. # Unless you are porting this to a new architecture, you shouldn't
  62. # need to change these (on the other hand, if you understand what you
  63. # are doing, go ahead!).
  64. #
  65.  
  66. CFLAGS_hpalib = +O3 +OS +ESlit
  67. LIBS_hpalib   = -lAt -lAlib -lm
  68. AUDIO_hpalib = Hpux/alib_
  69. CONFIG_hpalib = Hpux/
  70.  
  71. CFLAGS_hplow = -Ae +O3 -Wl, -a,archive -s
  72. LIBS_hplow=-lM
  73. AUDIO_hplow = Hpux/low_
  74. CONFIG_hplow = Hpux/
  75.  
  76. # yet another port to hp! This one might be the best yet.
  77. CFLAGS_hp3 = +O3 +OS +ESlit
  78. LIBS_hp3   = -lAt -lAlib -lm
  79. AUDIO_hp3 = Hpux/3_
  80. CONFIG_hp3 = Hpux/3_
  81.  
  82. CFLAGS_solaris = -O
  83. LIBS_solaris   = -lm
  84. AUDIO_solaris = Sparc/./
  85. CONFIG_solaris = Sparc/solaris_
  86.  
  87.  
  88. CFLAGS_sparc = -O -Bstatic
  89. LIBS_sparc   = -lm
  90. AUDIO_sparc = Sparc/./
  91. CONFIG_sparc = Sparc/
  92.  
  93. CFLAGS_dec = -O 
  94. LIBS_dec   = -lm -lAF
  95. AUDIO_dec = AF/
  96. CONFIG_dec = AF/dec_
  97.  
  98. CFLAGS_sgi = -j -O 
  99. LIBS_sgi   = -laudio -lm
  100. AUDIO_sgi = Sgi/
  101. CONFIG_sgi = Sgi/
  102.  
  103. CFLAGS_soundblaster = -O
  104. LIBS_soundblaster   = -lm
  105. AUDIO_soundblaster = Soundblaster/
  106. CONFIG_soundblaster = Soundblaster/
  107.  
  108. CFLAGS_linux = -N -O2 -funroll-loops
  109. LIBS_linux   = -lm
  110. AUDIO_linux = Linux/./
  111. CONFIG_linux = Linux/
  112.  
  113. CFLAGS_freebsd = -O6 -funroll-loops
  114. LIBS_freebsd = -lm
  115. AUDIO_freebsd = Linux/
  116. CONFIG_freebsd = Linux/
  117.  
  118. CFLAGS_sbos2 = -O2 -ZC++-comments -D__OS2__
  119. LIBS_sbos2   = -lm
  120. AUDIO_sbos2 = SBOS2/
  121. CONFIG_sbos2 = SBOS2/
  122.  
  123. CFLAGS = $(CFLAGS_$(MACHINE))
  124. COPTS = $(OPTS) $(CFLAGS)
  125. LIBS = $(LIBS_$(MACHINE))
  126. CONFIG = $(CONFIG_$(MACHINE))
  127. AUDIO = $(AUDIO_$(MACHINE))
  128.  
  129. OBJ_TRACKER = main$O $(AUDIO)audio$O st_read$O commands$O \
  130. audio$O automaton$O player$O getopt$O open$O tools$O \
  131. dump_song$O setup_audio$O notes$O display$O \
  132. $(UI)ui$O prefs$O tags$O autoinit$O
  133.  
  134. OBJ_ANALYZER = analyzer$O st_read$O open$O dump_song$O tools$O notes$O \
  135. prefs$O autoinit$O ${UI}ui$O display$O
  136.  
  137. OBJ_SPLITMOD = split$O tools$O st_read$O dump_song$O open$O notes$O \
  138. display$O prefs$O autoinit$O $(UI)ui$O
  139.  
  140.  
  141. all:    config.h tracker$(EXE) randomize$(EXE) analyzer$(EXE) splitmod$(EXE)
  142.  
  143. config.h:
  144.     cp $(CONFIG)config.h config.h
  145.  
  146. install: 
  147.     $(INSTALL) $(INST_BIN_OPT) tracker $(BIN_DIR)
  148.     $(INSTALL) $(INST_BIN_OPT) randomize $(BIN_DIR)
  149.     $(INSTALL) $(INST_BIN_OPT) analyzer $(BIN_DIR)
  150.  
  151. install.man:
  152.     $(INSTALL) $(INST_MAN_OPT) docs/tracker.1 $(MAN_DIR)/man1/tracker.1
  153.  
  154.  
  155.  
  156. devel: 
  157.     -rm -f $(INSTALL_DIR)/dtracker $(INSTALL_DIR)/splitmod
  158.     cp tracker $(INSTALL_DIR)/dtracker
  159.     cp splitmod $(INSTALL_DIR)/splitmod
  160.  
  161. tracker$(EXE): ${OBJ_TRACKER}
  162.     ${CC} -o tracker$(EXE) ${CFLAGS} ${OBJ_TRACKER} ${LIBS}
  163.  
  164. analyzer$(EXE): ${OBJ_ANALYZER}
  165.     $(CC) -o analyzer ${CFLAGS} ${OBJ_ANALYZER} ${LIBS}
  166.  
  167. randomize$(EXE): randomize.c
  168.     $(CC) -o randomize ${CFLAGS} randomize.c 
  169.  
  170. splitmod$(EXE): ${OBJ_SPLITMOD}
  171.     $(CC) -o splitmod$(EXE) ${CFLAGS} ${OBJ_SPLITMOD} ${LIBS}
  172.  
  173. main$O: main.c song.h
  174.     $(CC) ${COPTS} main.c
  175.  
  176. tools$O: main.c 
  177.     $(CC) ${COPTS} tools.c
  178.  
  179. $(AUDIO)audio$O: $(AUDIO)audio.c 
  180.     $(CC) -I. ${COPTS} $(AUDIO)audio.c -o $(AUDIO)audio$O
  181.  
  182. $(UI)ui$O: $(UI)ui.c
  183.     $(CC) -I. ${COPTS} $(UI)ui.c -o $(UI)ui$O
  184.  
  185. split$O: split.c
  186.     $(CC) ${COPTS} split.c
  187.  
  188. open$O: open.c
  189.     $(CC) ${COPTS} open.c
  190.  
  191. audio$O: audio.c
  192.     $(CC) ${COPTS} audio.c
  193.  
  194. automaton$O: automaton.c song.h channel.h
  195.     $(CC) ${COPTS} automaton.c
  196.  
  197. getopt$O: getopt.c getopt.h
  198.     $(CC) ${COPTS} getopt.c
  199.  
  200. getopt1$O: getopt1.c getopt.h
  201.     $(CC) ${COPTS} getopt1.c
  202.  
  203. player$O: player.c song.h channel.h
  204.     $(CC) ${COPTS} player.c
  205.  
  206. st_read$O: st_read.c song.h
  207.     $(CC) ${COPTS} st_read.c
  208.  
  209. commands$O: commands.c channel.h song.h
  210.     $(CC) ${COPTS} commands.c
  211.  
  212. unix/termio$O: unix/termio.c
  213.     $(CC) ${COPTS} unix/termio.c
  214. dump_song$O: dump_song.c
  215.     $(CC) $(COPTS) dump_song.c
  216. analyzer$O: analyzer.c
  217.     $(CC) $(COPTS) analyzer.c
  218. setup_audio$O: setup_audio.c
  219.     $(CC) $(COPTS) setup_audio.c
  220. notes$O: notes.c
  221.     $(CC) $(COPTS) notes.c
  222.  
  223. display$O: display.c
  224.     $(CC) $(COPTS) display.c
  225.  
  226.  
  227. clean:
  228.     -rm $(OBJ_TRACKER) $(OBJ_ANALYZER) $(OBJ_SPLITMOD) randomize$O
  229.     -rm tracker$(EXE) randomize$(EXE) splitmod$(EXE) analyzer$(EXE) core
  230.     -rm tracker.tar tracker.tar.Z tracker.lzh
  231.  
  232. export:
  233.     -rm tracker.tar.Z
  234.     -rm tracker.lzh
  235.     cd ..; lha a tracker/tracker.lzh tracker/*.[ch] \
  236.     tracker/*/*.[ch] tracker/*/*Docs/* \
  237.     tracker/Amiga/server/*.[ch] \
  238.     tracker/man/* \
  239.     tracker/*akefile tracker/Docs/*
  240.     cd ..; tar cvf tracker/tracker.tar tracker/*.[ch] \
  241.     tracker/*/*.[ch] tracker/*/*/*.[ch] \
  242.     tracker/*/Docs/* \ tracker/man/* tracker/Docs/* tracker/*akefile
  243.     compress tracker.tar
  244.